﻿<?php 
$user=ss_Main::getUser();
$templateUrl=SITELIVE.'tmpl/default';
$c=sscls_Request::getRequest('c');
$t=sscls_Request::getRequest('t');
$id=sscls_Request::getRequest('id');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html class="cufon-active cufon-ready" dir="ltr" xml:lang="en-gb" xmlns="http://www.w3.org/1999/xhtml" lang="en-gb">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="robots" content="index, follow">
  <meta name="keywords" content="joomla, Joomla">
  <meta name="title" content="What's New in 1.5?">
  <meta name="author" content="Administrator">
  <meta name="description" content="Joomla! - the dynamic portal engine and content management system">
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management">
  <title>Nam Thành</title>
  <script type="text/javascript" src="<?php echo $templateUrl ?>/images/mootools.js"></script>
  <script type="text/javascript" src="<?php echo $templateUrl ?>/images/caption.js"></script>
<script type="text/javascript" src="<?php echo $templateUrl ?>/images/jquery.js"></script>
<script type="text/javascript" src="<?php echo $templateUrl ?>/images/common.js"></script>
		<link rel="stylesheet" href="<?php echo $templateUrl ?>/galleriffic/css/galleriffic-4.css" type="text/css" />
		<script type="text/javascript" src="<?php echo $templateUrl ?>/galleriffic/js/jquery-1.3.2.js"></script>
		<script type="text/javascript" src="<?php echo $templateUrl ?>/galleriffic/js/jquery.history.js"></script>
		<script type="text/javascript" src="<?php echo $templateUrl ?>/galleriffic/js/jquery.galleriffic.js"></script>
		<script type="text/javascript" src="<?php echo $templateUrl ?>/galleriffic/js/jquery.opacityrollover.js"></script>
		
		<!-- We only want the thunbnails to display when javascript is disabled -->
		<script type="text/javascript">
			document.write('<style>.noscript { display: none; }</style>');
		</script>

	<script type="text/javascript">
	jQuery.noConflict();
	</script>

<link rel="stylesheet" href="<?php echo $templateUrl ?>/images/constant.css" type="text/css">
<link rel="stylesheet" href="<?php echo $templateUrl ?>/images/template.css" type="text/css">
<link rel="stylesheet" href="<?php echo $templateUrl ?>/images/sp.css" type="text/css">

<link rel="stylesheet" type="text/css" media="all" href="tmpl/default/jsdatepick-calendar/jsDatePick_ltr.min.css" />
<script type="text/javascript" src="tmpl/default/jsdatepick-calendar/jquery.1.4.2.js"></script>
<script type="text/javascript" src="tmpl/default/jsdatepick-calendar/jsDatePick.jquery.min.1.3.js"></script>
<script type="text/javascript">
	window.onload = function(){		
		
		g_globalObject = new JsDatePick({
			useMode:1,
			isStripped:true,
			target:"div3_example"
		});
		
		g_globalObject.setOnSelectedDelegate(function(){
			var obj = g_globalObject.getSelectedDay();
			alert("a date was just selected and the date is : " + obj.day + "/" + obj.month + "/" + obj.year);
			document.getElementById("div3_example_result").innerHTML = obj.day + "/" + obj.month + "/" + obj.year;
		});
		
		g_globalObject2 = new JsDatePick({
			useMode:1,
			isStripped:false,
			target:"div4_example",
			cellColorScheme:"beige"
		
		});
		
		g_globalObject2.setOnSelectedDelegate(function(){
			var obj = g_globalObject2.getSelectedDay();
			alert("a date was just selected and the date is : " + obj.day + "/" + obj.month + "/" + obj.year);
			document.getElementById("div3_example_result").innerHTML = obj.day + "/" + obj.month + "/" + obj.year;
		});		
	};
</script>
</head>
<body id="body">
 
<!--header-->
<div class="main">
	<div class="row-logo">
    	<h1 id="logo"><a href="index.php" title="Moto News"><img title="Moto News" src="<?php echo $templateUrl ?> /images/logo.png" class="png" alt="Moto News"></a></h1>
    </div>
</div>
<div class="wrapper-header-menu clear">
	<div class="bg-2">
    	<div class="main">
            <div class="header-menu clear">
                <div class="fright"><div class="module-search">
        <form action="index.php" method="post">
			<div class="search">
				<div class="search-input">
					<input name="keyword" id="mod_search_searchword" maxlength="20" alt="Search" class="inputbox" size="20" value="tìm kiếm..." onblur="if(this.value=='') this.value='tìm kiếm...';" onfocus="if(this.value=='tìm kiếm...') this.value='';" type="text">
				</div>
				<div class="search-button">
					<input value="Search" class="button" src="<?php echo $templateUrl ?> /images/search.png" onclick="this.form.submit();" type="image">	
				</div>
				</div>
			<input name="c" value="search" type="hidden">
			<input name="type" value="article" type="hidden">
		</form> </div>
</div>
                <div class="fleft">		<div class="moduletable_menu">
					</div>
	</div>
            </div>
        </div>
    </div>
</div>
<div class="wrapper-top-menu clear">
	<div class="bg-1">
    	<div class="main">
            <div class="row-top-menu">
				<div class="module">
                <ul class="menu-nav">
					<li <?php echo ($t==''&&$c=='')?'id="current" class="active"':''; ?>><a href="index.php">
						<span>Trang chủ</span></a>
					</li>
					<li <?php echo ($t=='details'&&$c=='news'&&$id==29)?'id="current" class="active"':''; ?> >
					<a href="index.php?c=news&t=details&id=29"><span>
					Giới thiệu
					</span></a></li>
					<li <?php echo ($c=='news'&&$id==12&&$t=='details')?'id="current" class="active"':''; ?> class="item55">
						<a href="index.php?c=news&id=12">
					<span>Tin Tức</span></a></li>
					<li <?php echo ($c=='news'&&$id==14)?'id="current" class="active"':''; ?>><a href="index.php?c=news&id=14">
					<span>Sự kiện</span></a>
					</li>
					<li <?php echo ($t=='details'&&$c=='news'&&$id==47)?'id="current" class="active"':''; ?>><a href="index.php?c=news&t=details&id=47">
					<span>Tuyển dụng</span></a>
					</li>
					<li <?php echo ($c=='news'&&$id==29&&$t!='details')?'id="current" class="active"':''; ?>><a href="index.php?c=news&id=29">
					<span>Khuyến mại</span></a>
					</li>
					<li <?php echo ($c=='product')?'id="current" class="active"':''; ?>><a href="index.php?c=product">
					<span>Sản phẩm</span></a></li>
					<li <?php echo ($t=='details'&&$c=='news'&&$id==46)?'id="current" class="active"':''; ?>><a href="index.php?c=news&t=details&id=46">
					<span>Liên hệ</span></a></li></ul>            
				</div>
				
            </div>
        </div>
    </div>
</div>
<div class="clear">
    <div class="main main-indent-bottom">
        <!--content-->
        <div id="content" class="png">
            <div class="clear">
                <!--right-->
                                <div id="right">
                    <div class="right-indent">
		<?php 
		$db=ss_Main::getDBO();
		$cats=$db->loadObjectList('select * from categories where parentid=11');
		$j=0;
		foreach((array)$cats as $cat){
		?>
			<div class="wrapper-box module s1">
			<div class="wrapper-corner png clear"><span class="png"><span class="png"></span></span></div>
			<div class="boxTitle">
				<h3>Lịch</h3>
			</div>
				<div id="div3_example" style="margin:-4px 0 0 0; border:dashed 0px red; width:205; height:230px;">
				</div>	
			<br>
        	<div class="wrapper-corner png clear"><span class="png"><span class="png"></span></span></div>
            <div class="wrapper-box-bg clear">
            <div class="boxTitle">
                    <h3><?php echo $cat->name ?></h3>
                </div>
				   <div class="boxIndent">
                    <div class="clear">
                    <div class="v-menu">
						<div class="proMenu">
						<div id="masterdiv" style="color: rgb(255, 0, 51);"></div>
						<?php 
							$sub_cats=$db->loadObjectList('select * from categories where parentid='.$cat->id);
							foreach((array)$sub_cats as $k=>$sub_cat)
							{
								?>
								<div onclick="SwitchMenu('sub<?php echo $j ?>')" class="menutitle"><?php echo $sub_cat->name ?></div>
									<span class="submenu" id="sub<?php echo $j ?>">
									<?php 
										$products=$db->loadObjectList('select * from products where mode='.$sub_cat->id);
										foreach((array)$products as $product)
										{
									?>
										<div><a href="index.php?c=product&t=details&productid=<?php echo $product->id ?>&o=thong-tin-chung#divData"><?php echo $product->productname ?></a></div>
									<?php } ?>
									</span>
								<?php
								$j++;	
							}?>
						</div>
					</div>
				</div>
                </div>
            </div>
			<br>
			<div class="wrapper-corner png clear"><span class="png"><span class="png"></span></span></div>
			<div class="boxTitle">
				<h3><?php echo "Liên kết web" ?></h3>
			</div>
			<!---  Lien ket web -->
			<div>
				<script type="text/javascript">
				function loads(the_site)
				{
					 window.open(the_site, '_blank');
				}
				</script>
				<select style="width: 100%;" name="loaitin" onchange="loads(this.options[this.selectedIndex].value);">
					<option value="">Chọn liên kết</option>
					<option value="http://www.honda.com.vn/">Trang chủ HONDA</option>
					<option value="http://choxe.net/">ChoXe mua bán xe</option>
					<option value="http://tuoitre.vn/">Tuổi trẻ Online</option>
					<option value="http://www.bongda.com.vn/">Bóng đá</option>
					<option value="http://hcm.24h.com.vn/">Tin tức 24h</option>
					<option value="http://vnexpress.net/">Tin nhanh Việt Nam</option>
				</select>
				<div style="text-align: center;padding-top: 4px;">
					<input type="button" onclick="clictolink()" name="B3" value="Mở liên kết">
				</div>
			</div>
			<!--<br>
			<div class="wrapper-corner png clear"><span class="png"><span class="png"></span></span></div>
			<div class="boxTitle">
				<h3><?php //echo "Lượt truy cập" ?></h3>
			</div>
			<div>
				<?php// include ("doanduc/tmpl/default/online.php");
				?> 
			</div>-->

		
		
		
			
		</div>
		<br/>
		<br/>
		<?php } ?>
                    </div>
                </div>
                <!--center-->
                <div id="container">
				<?php if($t==''&&$c==''){
				$db=ss_Main::getDBO();
				$product=$db->loadObjectList('select * from products where catid=9 limit 0,5');
				?>
				<script type="text/javascript" src="<?php echo $templateUrl ?>/images/s3Slider.js"></script>
				<script type="text/javascript">
								jQuery(document).ready(function() {
									jQuery('#slider1').s3Slider({
										timeOut: 4000 
									});
								});
							</script>
				<style type="text/css" media="screen">
					#slider1 {
						width: 720px; /* important to be same as image width */
						height: 300px; /* important to be same as image height */
						position: relative; /* important */
						overflow: hidden; /* important */
						background:#fff;
					}

					#slider1Content {
						width: 720px; /* important to be same as image width or wider */
						position: absolute;
						top: 0;
						margin-left: 0;
					}
					.slider1Image {
						float: left;
						position: relative;
						display: none;
					}
					.slider1Image span {
						position: absolute;
						font: 10px/15px Arial, Helvetica, sans-serif;
						padding: 10px 13px;
						width: 694px;
						background-color: #000;
						filter: alpha(opacity=70);
						-moz-opacity: 0.7;
						-khtml-opacity: 0.7;
						opacity: 0.7;
						color: #fff;
						display: none;
					}
					.clear {
						clear: both;
					}
					.slider1Image span strong {
						font-size: 14px;
					}
					.left {
						top: 0;
						left: 0;
						width: 110px !important;
						height: 300px;
					}
					.right {
						right: 15px;
						bottom: 0;
						width: 150px !important;
						height: 290px;
					}
					ul { list-style-type: none;}
				</style>
				<div class="clear">
				 <div id="slider1">
					<ul id="slider1Content">
						<?php foreach((array)$product as $k=>$p){ 
							$image=$db->loadObjectList('select * from product_images where productid='.$p->id.' limit 0,1');
						?>
						<li class="slider1Image" style="width:100%">
							<a href=""><img height="300" src="admin/images/products/<?php echo $image[0]->image_name ?>" alt="1" /></a>
							<span class="right"><strong><?php echo $p->productname ?></strong><br /><?php echo $p->description ?></span>
						</li>
						<?php } ?>
						<div class="clear slider1Image"></div>
					</ul>
				</div>
				</div>
				<br/>
				<?php } ?>
					<div class="clear">
						<div class="bg-main clear">
							<?php $this->loadcom(); ?>
						
						</div>
					 </div> 
                </div>
            </div>
        </div>
        <!--footer-->
        <div class="clear">
        	<div class="footer-indent">
                <div class="footer clear">
                    <div class="fright">		<div class="moduletable_menu">
					<ul class="menu"><li class="item62"><a href="index.php"><span>Trang chủ</span></a></li><li class="item63"><a href="index.php?c=product"><span>Sản phẩm</span></a></li><li class="item64"><a href="index.php?c=news&t=details&id=46"><span>Liên hệ</span></a></li><li class="item65"><a href="index.php?c=custommer&t=custommercode"><span>Kiểm tra thông tin khách hàng</span></a></li></ul>		</div>
		</div>
                    <div class="fleft">Bản quyền thuộc về công ty TNHH DV-TM Nam Thành</div>
                </div>
            </div>
        </div>
    </div>
</div>
</body></html>